﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
using System.Data;

namespace BUS
{
    public class TaiKhoanBUS
    {
        public DataTable DangNhap(TaiKhoanDTO _tk)
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            DataTable dt = new DataTable();
            dt = TKDAO.DangNhap(_tk);
            return dt;
        }
        public DataTable LayThongTinTaiKhoan_MaTaiKhoan(TaiKhoanDTO _tk)
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            DataTable dt = new DataTable();
            dt = TKDAO.LayThongTinTaiKhoan_MaTaiKhoan(_tk);
            return dt;
        }
        public DataTable LoadTaiKhoan()
        {
            DataTable dt = new DataTable();
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            dt = TKDAO.LoadTaiKhoan();
            return dt;
        }
        public DataTable DanhSachChucVu()
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            DataTable dt = new DataTable();
            dt = TKDAO.DanhSachChucVu();
            return dt;
        }
        public DataTable DanhSachGioiTinh()
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            DataTable dt = new DataTable();
            dt = TKDAO.DanhSachGioiTinh();
            return dt;
        }
        public DataTable TimKiemTaiKhoan(TaiKhoanDTO _tk)
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            DataTable dt = new DataTable();
            dt = TKDAO.TimKiemTaiKhoan(_tk);
            return dt;
        }
        public void ThemTaiKhoan(TaiKhoanDTO _tk)
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            TKDAO.ThemTaiKhoan(_tk);
        }
        public void XoaTaiKhoan(TaiKhoanDTO _tk)
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            TKDAO.XoaTaiKhoan(_tk);
        }
        public void CapNhatTaiKhoan(TaiKhoanDTO _tk)
        {
            TaiKhoanDAO TKDAO = new TaiKhoanDAO();
            TKDAO.CapNhatTaiKhoan(_tk);
        }
    }
}
